<include file="public@storage"/>
<link rel="stylesheet" href="__STATIC__/storage/print/print.css"/>
</head>
<body>
<div align="center" class="wrapper">
    <p>批次出库 <a href="{:url('storage/Bom/retention')}" style="font-size: 25px;"> 滞留出库</a></p>
    <form class="form-horizontal" style="padding-left:50px;padding-right: 50px">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 align="left" class="panel-title">生成批次信息</h3>
            </div>
            <div class="panel-body" style="padding-top:30px;padding-right: 8%; ">
                <div class="form-group">
                    <label class="col-md-2 control-label">批&nbsp;次&nbsp;号：</label>
                    <div class="col-md-4">
                        <input type="text" id="reel" class="form-control" placeholder="请输入批次号"/>
                    </div>
                    <label class="col-md-2 control-label">选&nbsp;择&nbsp;仓&nbsp;库：</label>
                    <div class="col-md-4">
                        <select class="form-control" id="storageUuid" name="storageUuid">
                            <empty name="storage">
                                <option>请选择仓库</option>
                                <else/>
                                <volist name="storage" id="vo">
                                    <option value="{$vo['uuid']}">{$vo['name']}</option>
                                </volist>
                            </empty>
                        </select>
                    </div>

                    <label class="col-md-2 control-label">物&nbsp;料&nbsp;号：</label>
                    <div  class="col-md-4 ">
                        <input type="text" id="subMaterielId" class="form-control" placeholder="输入物料号"/>
                    </div>

                </div>
            </div>
        </div>

        <div style="text-align: center">
            <button type="button" class="mui-btn mui-btn--raised mui-btn--primary" style="width: 20%"
                    onclick="findReels()">查询数据
            </button>
        </div>
    </form>
    <div class="panel-body">
        <div class="col-xs-12" style="padding: 0 5%;">
            <div id="but" style="float: right;display: none;margin-bottom: 10px;">
                <button type="button" class="btn btn-info btn-create" onclick="create()">生成单号</button>
                <button type="button" class="btn btn-info" onclick="excel()">导出excel</button>
            </div>
            <table class="table box-shade table-bordered table-striped"></table>
        </div>
    </div>
</div>
</body>
<script src="__STATIC__/storage/js/bom/create.js"></script>
<script>
    function findReels() {
        findReelsByBatch("{:url('/storage/Bom/findReels')}");
    }

    function create() {
        createBom("{:url('/storage/Bom/createBom')}");
    }

    function excel() {
        downloadExcel("{:url('/storage/Bom/downloadExcel')}",'batch');
    }

</script>
</html>